#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <shape.h>
#include "myscene.h"

namespace Ui {
class MainWindow;
}

enum ToolType
{
    SELECT,
    DRAW
};

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    
private slots:
    void on_toolButton_released();
    void graphicsViewMouseClicked(QGraphicsSceneMouseEvent* event);

    void on_actionZoon_In_triggered();
    void on_toolButton_2_released();
    void on_actionZoon_Out_triggered();

    void on_toolButton_3_released();

    void on_toolButton_7_released();

    void on_toolButton_4_released();

    void on_toolButton_5_released();

    void on_toolButton_6_released();

    void on_actionDelete_triggered();

    void on_toolButton_8_released();

    void on_actionSelect_Under_Object_triggered();

private:
    Shape* shape;
    qreal scale;
    ToolType toolType;
    Ui::MainWindow *ui;
    MyScene *scene;

    LayerType layerType;

    void selectUnder();
    void setScale(qreal scale);

};

#endif // MAINWINDOW_H
